package org.esky.properties;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * @author Jack.Xu
 * @ClassName: InputStreamFactory
 * @Description: TODO
 * @author: Jack.Xu
 * @date: 2013年10月23日 下午6:08:07
 */
public class InputStreamFactory {
	// 文件名检索
	public static InputStream getSystemResourceAsStream(String name){
		return ClassLoader.getSystemResourceAsStream(name);
	}
	
	// 资源文件检索
	public static InputStream getResourceAsStream(String name){
		return InputStreamFactory.class.getResourceAsStream(name);
	}
	
	// 文件的绝对路径
	public static InputStream getBufferedInputStream(String name) throws FileNotFoundException{
		return new BufferedInputStream(new FileInputStream(name));
	}
}
